package com.wonders.qxmanager.service.impl;

import java.math.BigDecimal;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.wonders.qxmanager.base.Parameter;
import com.wonders.qxmanager.base.WidgetPage;
import com.wonders.qxmanager.dao.OrganizationDao;
import com.wonders.qxmanager.model.Organization;
import com.wonders.qxmanager.service.OrganizationService;
import com.wonders.qxmanager.utils.PageArrayList;

@Service
public class OrganizationServiceImpl implements OrganizationService {

	@Resource
	private OrganizationDao orgDao;
	
	@Override
	public void addOrga(Organization org) {
		this.orgDao.save(org);

	}

	@Override
	public void updateOrg(String qlString, Parameter parameter) {
		this.orgDao.update(qlString,parameter);

	}

	@Override
	public void deleteOrg(int id) {
		this.orgDao.deleteOrg(id);

	}

	@Override
	public PageArrayList<Organization> getListByPage(Organization org,
			WidgetPage page) {
		return orgDao.getListByPage(org, page);
	}

	@Override
	public List<Organization> getAll() {
		return this.orgDao.getAll();
	}

	@Override
	public Organization getOrgById(BigDecimal id) {
		return null;
	}

}
